
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<ui:composition template="template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets">


    <ui:define name="menuDireito">
                    <div class="floatRight width73">

                        <h1>Pesquisar Professor <span class="dark"></span></h1>
                        <f:view>
                        <h:form>
                            <p><h:outputText value="Escolha a opcao de pesquisa desejada"/></p>

                            <h:selectOneMenu  value="#{searchProf.opcao}">
                                <f:selectItem itemValue="Nome" itemLabel="Nome" />
                                <f:selectItem itemValue="RG" itemLabel="R.G" />
                                <f:selectItem itemValue="CPF" itemLabel="CPF" />
                                <f:selectItem itemValue="matricula " itemLabel="N de matricula" />
                            </h:selectOneMenu>

                            <br></br><br></br>
                            Insira o termo que deseja procurar:<br></br>
                            <h:inputText value="#{searchProf.nome}"></h:inputText><br></br><br></br>

                            <br></br><br></br>
                            <div style="text-align: center">
                                <h:commandButton  value="Pesquisar" action="#{searchProf.procuraProfessor}"></h:commandButton>
                            </div>
                            <br></br><br></br>
                            <h1>Resultados da busca <span class="dark"></span></h1>
                            <h:dataTable var="obj" value="#{searchProf.prof}" border="1" width="100%">

                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Nome" />
                                    </f:facet>
                                    <h:outputText value="#{obj.nome}" />
                                </h:column>

                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Data de admissão" />
                                    </f:facet>
                                    <h:outputText value="#{obj.admissao}" />
                                </h:column>

                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Titulo" />
                                    </f:facet>
                                    <h:outputText value="#{obj.titulo}" />
                                </h:column>

                            </h:dataTable>

                             <br></br><br></br> <br></br><br></br> <br></br><br></br>
                        </h:form>
                            </f:view>
                    </div>
    </ui:define>
</ui:composition>